home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / xinetd / xinetd.2.0.6 / log.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-22  |  993 b   |  52 lines

  1. /*
  2.  * (c) Copyright 1992 by Panagiotis Tsirigotis
  3.  * All rights reserved.  The file named COPYRIGHT specifies the terms 
  4.  * and conditions for redistribution.
  5.  */
  6.  
  7. #ifndef LOG_H
  8. #define LOG_H
  9.  
  10. /*
  11.  * $Id: log.h,v 5.1 1992/10/31 23:59:07 panos Exp $
  12.  */
  13.  
  14. /*
  15.  * Meaning of logtype flags:
  16.  *
  17.  *    L_NONE:           no logging
  18.  *    L_FILE:           log output goes to a file
  19.  *    L_SYSLOG:         log output goes to syslog(3)
  20.  *    L_COMMON_FILE:    log output goes to the file specified in defaults
  21.  */
  22. typedef enum { L_NONE = 0, L_FILE, L_SYSLOG, L_COMMON_FILE } logtype_e ;
  23.  
  24. struct filelog
  25. {
  26.    char *filename ;                            /* always malloc'ed                        */
  27.     unsigned soft_limit ;
  28.     unsigned hard_limit ;
  29. } ;
  30.  
  31. #define FILELOG_SIZE_CONTROL( flp )        ( flp->soft_limit != 0 )    
  32.  
  33.  
  34. struct syslog
  35. {
  36.    int facility ;
  37.     int level ;
  38. } ;
  39.  
  40. struct log
  41. {
  42.     logtype_e log_type ;
  43.     struct filelog fl ;
  44.     struct syslog sl ;
  45. } ;
  46.  
  47. #define FILELOG( lp )                (&(lp)->fl)
  48. #define SYSLOG( lp )                    (&(lp)->sl)
  49.  
  50. #endif    /* LOG_H */
  51.  
  52.